// ignore: unused_import
import 'package:dio/dio.dart';
import 'package:flutter_house_manager/constants/index.dart';
import 'package:flutter_house_manager/utils/RequestDio.dart';

// 获取验证码
Future<dynamic> sendCodeAPI(Map<String, String> params) =>
    requestDio.get(HTTP_PATH.SEND_CODE, params: params);

// 登录
Future<dynamic> loginAPI(Map<String, String> data) =>
    requestDio.post(HTTP_PATH.LOGIN, data: data);

// 获取用户信息
Future<dynamic> getUserInfoAPI() => requestDio.get(HTTP_PATH.USER_INFO);

// 修改用户信息
Future updateUserInfoAPI(data) =>
    requestDio.put(HTTP_PATH.USER_INFO, data: data);

// 上传图片
Future<dynamic> uploadPhotoAPI(data) =>
    requestDio.upload(HTTP_PATH.UPLOAD, data: data);
